package com.xjscrm.console.vo;

import com.xjscrm.common.enums.WwFriendReqScene;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Objects;

@ApiModel("首页客户来源统计返回对象")
@Data
public class CountCustomerSceneVo {

    @ApiModelProperty("添加场景（0-未知；1-扫描二维码；2-手机号搜索；3-好友分享名片；4-群内）")
    private Integer scene;
    @ApiModelProperty("数量")
    private Integer userCount;
    @ApiModelProperty("占比")
    private Double percentage;
    @ApiModelProperty("添加场景描述")
    private String sceneDesc;

    public void setSceneDescByScene(){
        if(this.scene!=null){
            sceneDesc=WwFriendReqScene.getById(this.scene).getDesc();
        }
    }
}
